package ;
import js.html.Image;
import Carousel;
import js.JQuery;
import js.JQuery.JQueryHelper.*;

/**
 * ...
 * @author axel@cunity.me
 * 
 * inspired by code from:
 * CloudCarousel V1.0.5 - (c) 2011 by R Cecco. <http://www.professorcloud.com> - MIT License
 * 
 */
class Item
{
	public var image:Image;
	public var reflection:Reflection;
	public var alt:String;
	public var title:String;
	public var options:Options;
	public var orgWidth:Float;
	public var orgHeight:Float;
	public var imageOK:Bool;
	 
	public function new(img:Image, options:Options) 
	{
		orgWidth = img.width;
		orgHeight = img.height;
		image = img;
		alt = img.alt;
		title = img.title;
		this.options = options;
		
		imageOK = img.complete;
		
		if (this.options.reflHeight > 0)
		{
			reflection = new Reflection(image, options.reflHeight, options.reflOpacity);
		}
		J(image).css('position', 'absolute');
	}
	
}